package com.itheima.controller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.Result;
import com.itheima.pojo.Setmeal;
import com.itheima.service.MSetmealService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/setmeal")
public class MSetmealController {
    @Reference
    private MSetmealService mSetmealService;

    @PostMapping("/getSetmeal")
    public Result findAll(){
        return mSetmealService.findAll();
    }

    @PostMapping("/findById")
    public Result findById(Integer id){
        return mSetmealService.findById(id);
    }
}
